package reflectbroke;

import staticinner.StaticInnerSingleton;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class Test {

    public static void main(String[] args) throws Exception {

        Class<StaticInnerSingleton> clz = StaticInnerSingleton.class;
        Constructor<StaticInnerSingleton> constructor = clz.getDeclaredConstructor(null);
        constructor.setAccessible(true);
        StaticInnerSingleton staticInnerSingleton = constructor.newInstance(null);

        System.out.println(staticInnerSingleton == StaticInnerSingleton.getInstance());
    }
}
